<?php
class DB
{			
	private $dbret 	= array(); // all returns from db are stored here
	private $db_name = NULL;
	private $db   = 'promas';
	private $host = 'localhost';	
	private $user = 'root';
	private $pwd  = 'mikmik';
	private $dsn  = 'mysql:host=localhost;dbname=promas';
	private $dbPDO = null;
	
	public function makeConn()
	{
	try {		   
		    $this->dbPDO = new PDO($this->dsn,$this->user,$this->pwd);		    		    									
		}		
	catch (PDOException $e)	{ print "<hr>Databasefejl:<hr>" . $e . "<hr>"; }	
	}	
	
	public function showtables()
	{
		$query = "SHOW TABLES";			
		if ($sql = $this->dbPDO->query($query))//$conn->exec("SET CHARACTER SET utf8");
		{
			while ($row = $sql->fetch())
			{
				$d = $row[0];
				print "$d<br>";				
			}
		}				
	}	
	
	public function insert($table, $query)
	{}
	
	public function select($table, $fieldArr, $where)
	{}
	
	public function update($table, $fieldsArr, $where)
	{}
}	
?>